// g++ -I/opt/local/include ex-4-3.cpp

#include <iostream>

#include <boost/shared_ptr.hpp>

class TestClass
{
  int x;
  float y;
  long double z;
};

typedef boost::shared_ptr<int> IntPtr;
typedef boost::shared_ptr<long double> LongDoublePtr;

int main()
{
  enum keyword { BEGIN, CASE, END };

  // std::cout << "sizeof(void) = " << sizeof(void) << std::endl; ~~> not possible
  std::cout << "sizeof(char) = " << sizeof(char) << std::endl;
  std::cout << "sizeof(bool) = " << sizeof(bool) << std::endl;
  std::cout << "sizeof(short)  = " << sizeof(short) << std::endl;
  std::cout << "sizeof(int)  = " << sizeof(int) << std::endl;
  std::cout << "sizeof(long) = " << sizeof(long) << std::endl;
  std::cout << "sizeof(wchar_t) = " << sizeof(wchar_t) << std::endl;
  std::cout << "sizeof(float) = " << sizeof(float) << std::endl;
  std::cout << "sizeof(double) = " << sizeof(double) << std::endl;
  std::cout << "sizeof(long double) = " << sizeof(long double) << std::endl;

  std::cout << "sizeof(keyword) = " << sizeof(keyword) << std::endl;
  std::cout << "sizeof(TestClass) = " << sizeof(TestClass) << std::endl;

  std::cout << "sizeof(char*) = " << sizeof(char*) << std::endl;
  std::cout << "sizeof(bool*) = " << sizeof(bool*) << std::endl;
  std::cout << "sizeof(short*)  = " << sizeof(short*) << std::endl;
  std::cout << "sizeof(int*)  = " << sizeof(int*) << std::endl;
  std::cout << "sizeof(long*) = " << sizeof(long*) << std::endl;
  std::cout << "sizeof(wchar_t*) = " << sizeof(wchar_t*) << std::endl;
  std::cout << "sizeof(float*) = " << sizeof(float*) << std::endl;
  std::cout << "sizeof(double*) = " << sizeof(double*) << std::endl;
  std::cout << "sizeof(long double*) = " << sizeof(long double*) << std::endl;

  std::cout << "sizeof(IntPtr) = " << sizeof(IntPtr) << std::endl;
  std::cout << "sizeof(LongDoublePtr) = " << sizeof(LongDoublePtr) << std::endl;
}
